CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
PROJECT(evaluation_precision)
set(CMAKE_BUILD_TYPE Release) # this is Important ! ! ! ! !
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++11")

find_package(PCL 1.7 REQUIRED)
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
include_directories(${PCL_INCLUDE_DIRS})

include_directories(${PROJECT_SOURCE_DIR}/include)
FILE(GLOB SRCS *.cpp)
add_executable (evaluation_precision  ${SRCS} )

if(${USE_LAS})
    find_package(liblas)
    if(${LIBLAS_FOUND})
        message("Find liblas in " ${libLAS_INCLUDE_DIRS} " and " ${libLAS_LIBRARY_DIRS})
        target_compile_definitions(${PROJECT_NAME} PRIVATE LIB_LAS)
    else()
        message(AUTHOR_WARNING "Cannot find liblas-dev library. Disbale I/O functions for .las files.")
    endif()
endif()

target_link_libraries (evaluation_precision ${PCL_LIBRARIES} ${LIBS})

if(${LIBLAS_FOUND})
    target_link_libraries (evaluation_precision -llas)
endif()
